#ifndef GUI_H
#define GUI_H

#include <wx/wx.h>
#include <wx/grid.h>
#include <wx/button.h>
#include <wx/sizer.h>
#include <wx/stattext.h>

#include "db.h"
#include "db_op.h"
#include "db_info.h"






class BookManagerFrame : public wxFrame {
public:
    BookManagerFrame(const wxString& title);
    ~BookManagerFrame();

    void Correct_Database(wxCommandEvent& event);


private:

    void UpdateGridWithQueryResult(const QueryResult& result, const std::vector<std::string>& headers);
    void Initialization_Table(wxCommandEvent& event);

    void OnputBookinfo(wxCommandEvent& event);
    void OnPurchaseBook(wxCommandEvent& event);
    void OnRemoveBook(wxCommandEvent& event);
    void OnBorrowBook(wxCommandEvent& event);
    void OnReturnBook(wxCommandEvent& event);
    void OnQueryBooks(wxCommandEvent& event);
    void OnQueryPurchases(wxCommandEvent& event);
    void OnQueryRemovals(wxCommandEvent& event);
    void OnQueryBorrowings(wxCommandEvent& event);
    void OnStatistics(wxCommandEvent& event);

    void OnSize(wxSizeEvent& event);

    wxGrid* m_Grid;
    Library_Database* db;
    wxStaticText* staticText;
};




#endif